import request from "@/utils/request";

const MP_BASE_URL = "/fitness";

export function insert(data) {
  return request({
    url: `${MP_BASE_URL}/insert`,
    method: "post",
    data: data,
  });
}

export function update(data) {
  return request({
    url: `${MP_BASE_URL}/update`,
    method: "post",
    data: data,
  });
}

export function deleteFitness(id) {
  return request({
    url: `${MP_BASE_URL}/`+id,
    method: "delete",
  });
}


export function getDetails(data) {
  return request({
    url: `${MP_BASE_URL}/details`,
    method: "post",
    data: data,
  });
}

export function getCourses(year,month) {
  return request({
    url: `${MP_BASE_URL}/courses/month?year=${year}&month=${month}`,
    method: "get",
  });
}
